{"ast":null,"code":"import * as React from 'react';\nimport setRef from './setRef';\nexport default function useForkRef() {\n  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n    refs[_key] = arguments[_key];\n  }\n  /**\n   * This will create a new function if the refs passed to this hook change and are all defined.\n   * This means react will call the old forkRef with `null` and the new forkRef\n   * with the ref. Cleanup naturally emerges from this behavior.\n   */\n  return React.useMemo(() => {\n    if (refs.every(ref => ref == null)) {\n      return null;\n    }\n    return instance => {\n      refs.forEach(ref => {\n        setRef(ref, instance);\n      });\n    }; // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, refs);\n}","map":{"version":3,"names":["React","setRef","useForkRef","refs","useMemo","every","ref","instance","forEach"],"sources":["/data/messenger.client/node_modules/@mui/utils/esm/useForkRef.js"],"sourcesContent":["import * as React from 'react';\nimport setRef from './setRef';\nexport default function useForkRef(...refs) {\n  /**\n   * This will create a new function if the refs passed to this hook change and are all defined.\n   * This means react will call the old forkRef with `null` and the new forkRef\n   * with the ref. Cleanup naturally emerges from this behavior.\n   */\n  return React.useMemo(() => {\n    if (refs.every(ref => ref == null)) {\n      return null;\n    }\n\n    return instance => {\n      refs.forEach(ref => {\n        setRef(ref, instance);\n      });\n    }; // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, refs);\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,UAAU;AAC7B,eAAe,SAASC,UAAU,GAAU;EAAA,kCAANC,IAAI;IAAJA,IAAI;EAAA;EACxC;AACF;AACA;AACA;AACA;EACE,OAAOH,KAAK,CAACI,OAAO,CAAC,MAAM;IACzB,IAAID,IAAI,CAACE,KAAK,CAACC,GAAG,IAAIA,GAAG,IAAI,IAAI,CAAC,EAAE;MAClC,OAAO,IAAI;IACb;IAEA,OAAOC,QAAQ,IAAI;MACjBJ,IAAI,CAACK,OAAO,CAACF,GAAG,IAAI;QAClBL,MAAM,CAACK,GAAG,EAAEC,QAAQ,CAAC;MACvB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;EACL,CAAC,EAAEJ,IAAI,CAAC;AACV"},"metadata":{},"sourceType":"module"}